package com.x.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "log", catalog = "x")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Log implements java.io.Serializable {

	private static final long serialVersionUID = 6517123195790609923L;

	private String id;

	private Date paddingDate;

	private String paddingID;

	private int priority;

	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getPaddingDate() {
		return paddingDate;
	}

	@Column(name = "paddingID", nullable = false, length = 45)
	public String getPaddingID() {
		return paddingID;
	}

	@Column(name = "priority", nullable = false, length = 32)
	public int getPriority() {
		return priority;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setPaddingDate(Date paddingDate) {
		this.paddingDate = paddingDate;
	}

	public void setPaddingID(String paddingID) {
		this.paddingID = paddingID;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

}
